% author : Lei Yinghaonan
% Creation Date : 2021.11.26
% Last Date : 2021.11.28
% brief : Judge 2d or 3d of unstruct grid.

function nDim = InitUnstructDim(mesh)
minZ = min(mesh.coordinate(:,3));
maxZ = max(mesh.coordinate(:,3));

if(maxZ == minZ )
    nDim = 2;
else
    nDim = 3;
end